package com.jzo2o.foundations.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.api.foundations.dto.response.ServeAggregationResDTO;
import com.jzo2o.common.model.PageResult;
import com.jzo2o.foundations.model.domain.Serve;
import com.jzo2o.foundations.model.dto.request.LoginReqDTO;
import com.jzo2o.foundations.model.dto.request.ServePageQueryReqDTO;
import com.jzo2o.foundations.model.dto.request.ServeUpsertReqDTO;
import com.jzo2o.foundations.model.dto.response.ServeResDTO;

import java.math.BigDecimal;
import java.util.List;

/**
 * 区域服务接口
 * @author itcast
 */
public interface IServeService extends IService<Serve> {


    PageResult<ServeResDTO> pageServeRegion(ServePageQueryReqDTO servePageQueryReqDTO);

   void deleteServeRegionByServeId(long id);

    void updateSaleStatusByServeId(long id);

    void setOnHotByServeId(long id);

    void setOffHotByServeId(long id);

    int queryServeCountByRegionIdAndSaleStatus(Long id, int status);

    int queryServeCountByServeItemIdAndSaleStatus(Long id, int status);

    void add(List<ServeUpsertReqDTO> serveUpsertReqDTOS);

    Serve updateRegionPrice(Long id, BigDecimal price);

    Serve onSale(Long id);

    void deleteServe(Long id);

    void offSale(Long id);

    Serve selectByIdCache(Long id);

    ServeAggregationResDTO findServeDetailById(Long id);
}
